using System.Drawing;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

using Styx;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;

namespace BrodieMobList
{
	public class BMobList
	{
		private static LocalPlayer Me { get { return StyxWoW.Me; } }
		
		#region Mobs for Spell Avoidance or Special Interactions
		// Eastern Kingdoms
		public static WoWUnit SIAgents { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 48742 || u.Entry == 48741) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit HillsbradHumans { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 2270 || u.Entry == 2503 || u.Entry == 2269) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		
		// Kalimdor
		public static WoWUnit TaurajoLooter { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 37743) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}

        // Outlands
        public static WoWUnit NetherDrake { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 20021 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit ProtoDrake { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 21821 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit AdultDrake { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 21817 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit MatureDrake { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 21820 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit Electromental { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 21729 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit ScalewingSerpent { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 20749 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit PhaseHunter { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 18879 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }

        // Northrend
        public static WoWUnit MechagnomeSoul { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 25814 && u.IsDead).OrderBy(u => u.Distance).FirstOrDefault(); } }

		// Pandaria Mobs
		public static WoWUnit JungleShredder { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 67285 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit MasterCaller { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 69286 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit MechaPounder { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 67967 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit ShredmasterP { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 67371 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit DreadKunchong { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 64717 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit Amberhusk { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 64982 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit AScorpion { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 63728 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit ShaoTienSorcerer { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 65133 && u.Distance < 5 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit Tormentor { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 59238 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit Krichon { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 63978 && u.Distance < 30).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit Cracklefang { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 58768 && u.IsAlive).FirstOrDefault();}}
		public static WoWUnit Sydow { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 63240 && u.IsAlive && u.Distance < 30).FirstOrDefault();}}
		public static List<WoWUnit> MantidNiuzao { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 61502 || u.Entry == 61508 || u.Entry == 61509 && u.Distance < 50 && u.IsAlive).OrderBy(u => u.Distance).ToList();}}
		public static WoWUnit WarbringerScout { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => (u.Entry == 69768 || u.Entry == 69769 || u.Entry == 69841 || u.Entry == 69842) && u.IsAlive).FirstOrDefault();}}
		public static WoWUnit VengefulSpirit { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => (u.Entry == 69806) && u.IsAlive).FirstOrDefault();}}
		
		// Isle of Thunder Mobs
		public static WoWUnit PrimalDirehorn { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => (u.Entry == 70016 || u.Entry == 69983 || u.Entry == 69142 || u.Entry == 70017 || u.Entry == 70018 || u.Entry == 70019 || u.Entry == 69983 ) && u.IsAlive && u.Distance < 30).FirstOrDefault();}}
		public static WoWUnit ZColossus { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 69405 && u.IsAlive && u.Distance < 30).FirstOrDefault();}}
		public static WoWUnit MDevilsaur { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => (u.Entry == 69406 || u.Entry == 70591) && u.IsAlive && u.Distance < 30).FirstOrDefault();}}
		public static WoWUnit MLMonoHan { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 69326 && u.IsAlive && u.Distance < 50).FirstOrDefault();}}
		public static WoWUnit Itoka { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 69461 && u.IsAlive && u.Distance < 50).FirstOrDefault();}}
		public static WoWUnit FCHoku { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 69435 && u.IsAlive && u.Distance < 50).FirstOrDefault();}}
		public static List<WoWUnit> VileSpit { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 70571 && u.Distance < 100).ToList();}}
		public static List<WoWUnit> EnergizedMetal { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 69637 && u.Distance < 20).ToList();}}
		public static List<WoWUnit> BallLightning { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.Entry == 69462 && u.Distance < 20).ToList();}}
		
		// Timeless Isle Mobs
		public static WoWUnit TimelessBirds { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 72762 || u.Entry == 73158) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit TimelessTurtle { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 72765 || u.Entry == 72764 || u.Entry == 72045 || u.Entry == 73161) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit TimelessOxen { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 72843 || u.Entry == 73160 || u.Entry == 72844) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit TimelessTiger { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 72807 || u.Entry == 72805) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit TimelessRock { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 72809 && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit Ordon { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 72898 || u.Entry == 72896 || u.Entry == 72875 || u.Entry == 72892 || u.Entry == 72895 || u.Entry == 72894) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit Spineclaw { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 72766) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault();}}
		public static WoWUnit SpectralPanda { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 73018 || u.Entry == 73025 || u.Entry == 73021) && u.IsAlive && u.ControllingPlayer == null).OrderBy(u => u.Distance).FirstOrDefault();}}
        public static WoWUnit SpectralPandaMist { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 73025 && u.IsAlive && u.ControllingPlayer == Me).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit SpectralPandaBrew { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 73018 && u.IsAlive && u.ControllingPlayer == Me).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit SpectralPandaWind { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && u.Entry == 73021 && u.IsAlive && u.ControllingPlayer == Me).OrderBy(u => u.Distance).FirstOrDefault(); } }

        // Draenor Mobs
        public static WoWUnit Grulloc { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 70863) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit Grosh { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 78230) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }
        public static WoWUnit Clusterpult { get { return ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => u.IsValid && (u.Entry == 76629) && u.IsAlive).OrderBy(u => u.Distance).FirstOrDefault(); } }

		#endregion
		
		#region Items to check for

		public static WoWItem HiddenStash { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 61387); }} // Eastern Plaguelands Drop
        public static WoWItem HandfulOfTreats { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 37586); } } // For Hallows End
		public static WoWItem OozingBag { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 20768); }} // Silithus Drop
		
		public static WoWItem SingingCrystal { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 103641); }}
		public static WoWItem BookOfTheAges { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 103642); }}
		public static WoWItem DewOfEternalMorning { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 103643); }}
		public static WoWItem CrystalOfInsanity { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 86569); }}
        public static WoWItem WindfeatherPlume { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 104287); } }

        public static WoWItem MistyPijiu { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 104334); } }
        public static WoWItem BubblingPijiu { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 104336); } }
        public static WoWItem ThickPijiu { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 104335); } }

        public static WoWItem Hearthstone { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 6948); } }
        public static WoWItem InnkeepersDaughter { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 64488); } }
        public static WoWItem EtherealPortal { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 54452); } }
        public static WoWItem DarkPortalHS { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 93672); } }
        public static WoWItem TDFabricator { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 60498); } }

        public static WoWItem BilgewaterTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 64884); } }
        public static WoWItem DarkspearTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45582); } }
        public static WoWItem HuojinTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 83080); } }
        public static WoWItem OrgrimmarTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45581); } }
        public static WoWItem SilvermoonTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45585); } }
        public static WoWItem ThunderBluffTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45584); } }
        public static WoWItem UndercityTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45583); } }

        public static WoWItem DarnassusTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45579); } }
        public static WoWItem ExodarTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45580); } }
        public static WoWItem GilneasTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 64882); } }
        public static WoWItem GnomereganTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45578); } }
        public static WoWItem IronforgeTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45577); } }
        public static WoWItem StormwindTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 45574); } }
        public static WoWItem TushuiTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 83079); } }

        public static WoWItem ArgentCrusadeTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 43154); } }
        public static WoWItem KirinTorTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 43157); } }
        public static WoWItem EbonBladeTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 43155); } }
        public static WoWItem WyrmrestTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 43156); } }

        public static WoWItem DragonmawTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 65909); } }
        public static WoWItem WildhammerTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 65908); } }
        public static WoWItem HyjalTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 65906); } }
        public static WoWItem RamkahenTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 65904); } }
        public static WoWItem EarthenTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 65905); } }
        public static WoWItem TherazaneTabard { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 65907); } }

        public static WoWItem SmallCrescentSaberfish { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111589); } }
        public static WoWItem MedCrescentSaberfish { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111595); } }
        public static WoWItem LargeCrescentSaberfish { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111601); } }
        public static WoWItem SmallBlackwaterWhiptail { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111662); } }
        public static WoWItem MedBlackwaterWhiptail { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111663); } }
        public static WoWItem LargeBlackwaterWhiptail { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111670); } }
        public static WoWItem SmallSeaScorpion { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111658); } }
        public static WoWItem MedSeaScorpion { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111665); } }
        public static WoWItem LargeSeaScorpion { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111672); } }
        public static WoWItem SmallFireAmmonite { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111656); } }
        public static WoWItem MedFireAmmonite { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111666); } }
        public static WoWItem LargeFireAmmonite { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111673); } }
        public static WoWItem SmallJawlessSkulker { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111650); } }
        public static WoWItem MedJawlessSkulker { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111669); } }
        public static WoWItem LargeJawlessSkulker { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111676); } }
        public static WoWItem SmallFatSleeper { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111651); } }
        public static WoWItem MedFatSleeper { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111668); } }
        public static WoWItem LargeFatSleeper { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111675); } }
        public static WoWItem SmallAbyssalGulperEel { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111659); } }
        public static WoWItem MedAbyssalGulperEel { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111664); } }
        public static WoWItem LargeAbyssalGulperEel { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111671); } }
        public static WoWItem SmallBlindLakeSturgeon { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111652); } }
        public static WoWItem MedBlindLakeSturgeon { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111667); } }
        public static WoWItem LargeBlindLakeSturgeon { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 111674); } }

        public static WoWItem WhisperingCrystal { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 118922); } }
        public static WoWItem AmmoniteLure { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 110291); } }
        public static WoWItem GulperEelLure { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 110293); } }
        public static WoWItem SkulkerLure { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 110274); } }
        public static WoWItem SleeperLure { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 110289); } }
        public static WoWItem SturgeonLure { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 110290); } }
        public static WoWItem WhiptailLure { get { return Me.BagItems.FirstOrDefault(r => r.Entry == 110294); } }

		#endregion
	}
}